(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
merge(x, nil) → x
merge(nil, y) → y
merge(++(x, y), ++(u, v)) → ++(x, merge(y, ++(u, v)))
merge(++(x, y), ++(u, v)) → ++(u, merge(++(x, y), v))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
merge(z0, nil) → z0
merge(nil, z0) → z0
merge(++(z0, z1), ++(u, v)) → ++(z0, merge(z1, ++(u, v)))
merge(++(z0, z1), ++(u, v)) → ++(u, merge(++(z0, z1), v))
Tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
MERGE(++(z0, z1), ++(u, v)) → c3(MERGE(++(z0, z1), v))
S tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
MERGE(++(z0, z1), ++(u, v)) → c3(MERGE(++(z0, z1), v))
K tuples:none
Defined Rule Symbols:
merge
Defined Pair Symbols:
MERGE
Compound Symbols:
c2, c3
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing nodes:
MERGE(++(z0, z1), ++(u, v)) → c3(MERGE(++(z0, z1), v))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
merge(z0, nil) → z0
merge(nil, z0) → z0
merge(++(z0, z1), ++(u, v)) → ++(z0, merge(z1, ++(u, v)))
merge(++(z0, z1), ++(u, v)) → ++(u, merge(++(z0, z1), v))
Tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
S tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
K tuples:none
Defined Rule Symbols:
merge
Defined Pair Symbols:
MERGE
Compound Symbols:
c2
(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
We considered the (Usable) Rules:none
And the Tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(++(x1, x2)) = [1] + x2
POL(MERGE(x1, x2)) = [5]x1
POL(c2(x1)) = x1
POL(u) = 0
POL(v) = 0
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
merge(z0, nil) → z0
merge(nil, z0) → z0
merge(++(z0, z1), ++(u, v)) → ++(z0, merge(z1, ++(u, v)))
merge(++(z0, z1), ++(u, v)) → ++(u, merge(++(z0, z1), v))
Tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
S tuples:none
K tuples:
MERGE(++(z0, z1), ++(u, v)) → c2(MERGE(z1, ++(u, v)))
Defined Rule Symbols:
merge
Defined Pair Symbols:
MERGE
Compound Symbols:
c2
(7) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(8) BOUNDS(O(1), O(1))